<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>黔东南州民爆行业公共服务平台</title>
		<meta name="keywords" content="网站关键字1,网站关键字2,网站关键字3,网站关键字4,网站关键字5">
	    <meta name="description" content="本网站简介">
	    <link rel="shortcut icon" href="../../../../static/images/favicon.ico">
		<link rel="stylesheet" href="../../../../static/js/lib/layui/css/layui.css" />
		<link rel="stylesheet" href="../../../../static/css/global.css" />
		<link rel="stylesheet" href="../../../../static/css/layout.css" />
		<link rel="stylesheet" href="../../../../static/js/lib/customScrollbar/mCustomScrollbar.css" />
		
		
		<style type="text/css">
		body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"微软雅黑";}
		#l-map{height:100%;width:78%;float:left;border-right:2px solid #bcbcbc;}
		#r-result{height:100%;width:20%;float:left;}
	</style>
		<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=kx0ZqRGusckdkCjO1NQxi4qsQjEVlwXc"></script>
		<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
		<script src="../../../../../hplus/js/jquery.min.js"></script>
		<script src="../../../../../hplus/js/plugins/layer/layer.min.js"></script>
	</head>
	<body style="position: relative;height: 100vh;">
		<div class="sidebar">
			<ul>
				<li class="current"><a href="../demo.html"><i class="layui-icon layui-icon-home"></i><p>首页</p></a></li>
				<li><a href="../../../../../publicSecurity/gonganHome.html"><i class="layui-icon layui-icon-set"></i><p>安全监管</p></a></li>
				<li><a href="#"><i class="layui-icon layui-icon-video"></i><p>现场视频</p></a></li>
			</ul>
		</div>
		<div class="fly-header clearBoth pl-20 pr-20" style="opacity: .8;height: 50px;">
			<a href="logo.html" class="logo fl" style="line-height: 50px;">
				<img src="../../../../static/images/nationalEmblem.png" style="width: 30px;">
				<span style="font-size: 20px;">黔东南州民爆行业公共服务云平台</span>
			</a>
			<div class="fr fly-header-msg" style="top: 16px;right: 170px;">
				<span>2018-11-11<span>星期天</span></span>
				<span>多云：<span>微风0级</span><span>22℃</span></span>
				<span>本月登录：<span>12次</span></span>
				<span>本月登录时长：<span>20小时</span></span>
			</div>
			<ul class="loginbar login-info" style="top: 9px;line-height: 30px;">
                <li id="userInfoBox" class="layui-nav-item userNameBox">
                    <a href="#"><img src="../../../../static/images/index/Homepage-onthedayofconstructionpersonnel.png" style="width: 30px;height: 30px;" /></a>
                </li>
                <li id="logoutBtn" class="extBtn" data-toggle="logout">
                    <a href="javascript: void(0);" onclick="loginout()">退出登录</a>
                </li>
            </ul>
            <ul class="loginbar islogin layui-hide" style="top: 9px;line-height: 30px;">
                <li id="loginBtn" data-toggle="login" class="layui-nav-item login-btn" type="login">
                    <a href="javascript:;">登陆</a>
                </li>
                <li id="regBtn" class="layui-nav-item login-btn" type="reg">
                	<a href="http://qaaccount.915dj.com/reg/person">注册</a>
                </li>
            </ul>
		</div>
		<!-- 顶部筛选和搜索 -->
		<div class="filter-bar mb-30 clearBoth" style="position: absolute;top: 60px; left: 90px; right: 10px; width: inherit; z-index: 122;">
			<div class="title">选择图层：</div>
			<div class="filter-scroll">
				<div class="filter-item-box">
					<a class="filter-item " href="demo.html">
						<span><span>首页</span></span>
					</a>
					<a class="filter-item current" >
						<span><span>爆破项目</span></span>
					</a>
					<a class="filter-item" href="Location.html">
						<span><span>民爆库房</span></span>
					</a>
					<a class="filter-item" href="Location.html">
						<span><span>工程技术人员</span></span>
					</a>
					<a class="filter-item" href="Location.html">
						<span><span>爆破员</span></span>
					</a>
					<a class="filter-item" href="Location.html">
						<span><span>安全员</span></span>
					</a>
					<a class="filter-item" href="Location.html">
						<span><span>保管员</span></span>
					</a>
					<a class="filter-item" href="Location.html">
						<span><span>危险地图</span></span>
					</a>
				</div>
			</div>
			<div class="search-box">
				<img src="../../../../static/images/tongji1-sousuoanniu.png" />
				<input type="text" placeholder="输入关键字搜索" class="layui-input" />
			</div>
			<div id="rs-result" style="margin-right: -20px;margin-top:0px;">
				<div class="optionpanel">
				<label style="color:#fff">主题</label>
				<select id="stylelist" onchange="changeMapStyle(this.value)"></select>
				</div>
			</div>
		</div>
		<div id="allmap"></div>
		
		
		<script type="text/javascript" src="http://lbsyun.baidu.com/custom/stylelist.js"></script>

		
		
		<script type="text/javascript">
	
	//初始化模板选择的下拉框
	var sel = document.getElementById('stylelist');
	for ( var key in mapstyles) {
		var style = mapstyles[key];
		var item = new Option(style.title, key);
		sel.options.add(item);
	}
	// 百度地图API功能
	var map = new BMap.Map("allmap");
	
	map.enableScrollWheelZoom();
	map.addControl(new BMap.ScaleControl()); // 添加比例尺控件
	map.addControl(new BMap.OverviewMapControl()); //添加缩略地图控件
	map.centerAndZoom(new BMap.Point(107.925847,26.909226), 10);
	changeMapStyle('midnight')
	sel.value = 'midnight';

	function changeMapStyle(style) {
		map.setMapStyle({
			style : style
		});
		$('#desc').html(mapstyles[style].desc);
	}
	
	function getBoundary(){       
		var bdary = new BMap.Boundary();
		bdary.get("黄平县", function(rs){       //获取行政区域
			map.clearOverlays();        //清除地图覆盖物       
			var count = rs.boundaries.length; //行政区域的点有多少个
			if (count === 0) {
				alert('未能获取当前输入行政区域');
				return ;
			}
          	var pointArray = [];
			for (var i = 0; i < count; i++) {
				var ply = new BMap.Polygon(rs.boundaries[i], {strokeWeight: 2, strokeColor: "#ff0000"}); //建立多边形覆盖物
				map.addOverlay(ply);  //添加覆盖物
				pointArray = pointArray.concat(ply.getPath());
			}    
			map.setViewport(pointArray);    //调整视野  
			addlabel();               
		});   
	}

	setTimeout(function(){
		getBoundary();
	}, 2000);

	function addlabel() {
	    var pointArray = [
	      new BMap.Point(107.855847,26.949226)];
	    var optsArray = [{}];
	    var labelArray = [];
	    var contentArray = [
	      "黄平县"];
	    for(var i = 0;i < pointArray.length; i++) {
	      optsArray[i].position = pointArray[i];
	      labelArray[i] = new BMap.Label(contentArray[i],optsArray[i]);
	      labelArray[i].setStyle({
			color : "red",
			fontSize : "16px",
				 height : "20px",
				 lineHeight : "20px",
				 fontFamily:"微软雅黑"
			 });
	      map.addOverlay(labelArray[i]);
	    }	  
	}
</script>
<script type="text/javascript">
		function loginout(){
			parent.layer.confirm("您确定要退出系统吗?", {
			    btn: ['确定','取消'], //按钮
			    shade: true, //不显示遮罩
			    shadeClose: true,
		        shade: 0.5,
			}, function(){
				top.location.href = '/blast/user/loginout';
			}, function(){
			    
			});
		}
		</script>		
	</body>
</html>
